package com.qf.postProccessor;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

public class MyPostBeanProcessor implements BeanPostProcessor {
    //是在执行init方法之前执行的
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("执行init之前");
        return null;
    }
    //实在执行init方法之后执行的
    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("执行init之后");
        return null;
    }
}
